// CRC32: D28A3C08 | Matched 4 variants of 1 shaders: Standard (Specular setup)
// 
//    Unity headers extracted from StandardSpecular.shader
//    Shader "Standard (Specular setup)" {
//      Properties {
//       _Color ("Color", Color) = (1,1,1,1)
//       _MainTex ("Albedo", 2D) = "white" { }
//       _Cutoff ("Alpha Cutoff", Range(0,1)) = 0.5
//       _Glossiness ("Smoothness", Range(0,1)) = 0.5
//       _SpecColor ("Specular", Color) = (0.2,0.2,0.2,1)
//       _SpecGlossMap ("Specular", 2D) = "white" { }
//       _BumpScale ("Scale", Float) = 1
//       _BumpMap ("Normal Map", 2D) = "bump" { }
//       _Parallax ("Height Scale", Range(0.005,0.08)) = 0.02
//       _ParallaxMap ("Height Map", 2D) = "black" { }
//       _OcclusionStrength ("Strength", Range(0,1)) = 1
//       _OcclusionMap ("Occlusion", 2D) = "white" { }
//       _EmissionColor ("Color", Color) = (0,0,0,1)
//       _EmissionMap ("Emission", 2D) = "white" { }
//       _DetailMask ("Detail Mask", 2D) = "white" { }
//       _DetailAlbedoMap ("Detail Albedo x2", 2D) = "grey" { }
//       _DetailNormalMapScale ("Scale", Float) = 1
//       _DetailNormalMap ("Normal Map", 2D) = "bump" { }
//      [Enum(UV0,0,UV1,1)]  _UVSec ("UV Set for secondary textures", Float) = 0
//      [HideInInspector]  _Mode ("__mode", Float) = 0
//      [HideInInspector]  _SrcBlend ("__src", Float) = 1
//      [HideInInspector]  _DstBlend ("__dst", Float) = 0
//      [HideInInspector]  _ZWrite ("__zw", Float) = 1
//      }
//      Fallback "VertexLit"
//      SubShader 1/2 {
//        LOD 300
//        Tags { "RenderType"="Opaque" "PerformanceChecks"="False" }
//        Pass 1/5 {
//          Name "FORWARD"
//          Tags { "LIGHTMODE"="ForwardBase" "SHADOWSUPPORT"="true" "RenderType"="Opaque" "PerformanceChecks"="False" }
//          ZWrite [_ZWrite]
//          Blend [_SrcBlend] [_DstBlend]
//          GpuProgramID 36701
//          Program "vp" {
//            SubProgram "d3d9 " {
// 8:           Keywords { "DIRECTIONAL" "DIRLIGHTMAP_OFF" "DYNAMICLIGHTMAP_ON" "FOG_LINEAR" "LIGHTMAP_OFF" "SHADOWS_SCREEN" "VERTEXLIGHT_ON" "_EMISSION" }
// 2:           Keywords { "DIRECTIONAL" "DIRLIGHTMAP_OFF" "DYNAMICLIGHTMAP_ON" "FOG_LINEAR" "LIGHTMAP_OFF" "SHADOWS_SCREEN" "VERTEXLIGHT_ON" }
// 4:           Keywords { "DIRECTIONAL" "DIRLIGHTMAP_OFF" "DYNAMICLIGHTMAP_ON" "FOG_LINEAR" "LIGHTMAP_OFF" "SHADOWS_SCREEN" "_EMISSION" }
// 1:           Keywords { "DIRECTIONAL" "DIRLIGHTMAP_OFF" "DYNAMICLIGHTMAP_ON" "FOG_LINEAR" "LIGHTMAP_OFF" "SHADOWS_SCREEN" }
//              Bind "vertex" Vertex
//              Bind "normal" Normal
//              Bind "texcoord" TexCoord0
//              Bind "texcoord1" TexCoord1
//              Bind "texcoord2" TexCoord2
//              Matrix 4 [_Object2World] 3
//              Matrix 7 [_World2Object] 3
//              Matrix 0 [glstate_matrix_mvp]
//              Vector 15 [_DetailAlbedoMap_ST]
//              Vector 14 [_MainTex_ST]
//              Vector 11 [_ProjectionParams]
//              Vector 12 [_ScreenParams]
//              Float 16 [_UVSec]
//              Vector 10 [_WorldSpaceCameraPos]
//              Vector 13 [unity_DynamicLightmapST]
//            }
//          }
//        }
//      }
//    }
// 
// Headers extracted with DarkStarSword's extract_unity_shaders.py
// https://raw.githubusercontent.com/DarkStarSword/3d-fixes/master/extract_unity_shaders.py

    vs_3_0
    def c17, 0.5, 0, 0, 0
    dcl_position v0
    dcl_normal v1
    dcl_texcoord v2
    dcl_texcoord1 v3
    dcl_texcoord2 v4
    dcl_position o0
    dcl_texcoord o1
    dcl_texcoord1 o2.xyz
    dcl_texcoord2 o3
    dcl_texcoord3 o4
    dcl_texcoord4 o5
    dcl_texcoord5 o6
    dcl_texcoord6 o7
    dcl_texcoord7 o8.x
    dcl_texcoord8 o9.xyz

def c220, 0, 1, 0.0625, 0.5
dcl_2d s0

texldl r3, c220.z, s0

// Unity reflection/specular fix inserted with DarkStarSword's shadertool.py:
// shadertool.py -I ../.. --fix-unity-reflection --auto-fix-vertex-halo --add-fog-on-sm3-update --only-autofixed --ignore-register-errors Standard (Specular setup)/vp/D28A3C08.txt
mov r30, c10
mov r29, c220.x
mul r29.x, r3.x, -r3.y
dp4 r28.x, c180, r29
dp4 r28.y, c181, r29
dp4 r28.z, c182, r29
dp4 r28.w, c183, r29
dp4 r29.x, c190, r28
dp4 r29.y, c191, r28
dp4 r29.z, c192, r28
add r30.xyz, r30, -r29

    mad o1.xy, v2, c14, c14.zwzw
    abs r0.x, c16.x
    sge r0.x, -r0.x, r0.x
    mov r1.xy, v2
    lrp r2.xy, r0.x, r1, v3
    mad o1.zw, r2.xyxy, c15.xyxy, c15
    dp4 r0.x, c4, v0
    dp4 r0.y, c5, v0
    dp4 r0.z, c6, v0
    add o2.xyz, r0, -r30
    mov o9.xyz, r0
    mul r0.xyz, c8, v1.y
    mad r0.xyz, c7, v1.x, r0
    mad r0.xyz, c9, v1.z, r0
    dp3 r0.w, r0, r0
    rsq r0.w, r0.w
    mul o5.xyz, r0.w, r0
    dp4 r0.y, c1, v0
    mul r1.x, r0.y, c11.x
    mul r1.w, r1.x, c17.x
    dp4 r0.x, c0, v0
    dp4 r0.w, c3, v0

mov o0, r0 // Relocated from line 113 with shadertool.py

// Automatic vertex shader halo fix inserted with DarkStarSword's shadertool.py:
// shadertool.py -I ../.. --fix-unity-reflection --auto-fix-vertex-halo --add-fog-on-sm3-update --only-autofixed --ignore-register-errors Standard (Specular setup)/vp/D28A3C08.txt
texldl r31, c220.z, s0
add r31.w, r0.w, -r31.y
mad r0.x, r31.w, r31.x, r0.x

    mul r1.xz, r0.xyww, c17.x
    mad o7.xy, r1.z, c12.zwzw, r1.xwzw
    mad o6.zw, v4.xyxy, c13.xyxy, c13
    dp4 r0.z, c2, v0

//     mov o0, r0 // Relocated to line 109 with shadertool.py
mov o0.z, r0 // Inserted by shadertool.py

    mov o7.zw, r0
    mov o8.x, r0.z
    mov o3, c17.y
    mov o4, c17.y
    mov o5.w, c17.y
    mov o6.xy, c17.y
